
export interface routeType {
    path: string
    component?: any
    meta?: {
        mainPage?:boolean
        title?: string
        needLogin?: boolean
    }
    redirect?: string,
    children?: Array<routeType>
}
const routes:routeType[] = [
    {
      path: "/",
      component: ()=>import('@/layout'),
      meta:{
        mainPage:true
      },
      children: [
        {
          path: "home",
          component: ()=>import('@/pages/Home'),
          meta:{
            title:'首页'
          }
        },
        {
          path: "about",
          component: ()=>import('@/pages/About'),
          meta:{
            title:'关于'
          }
        },
        {
          path: "article/:id?",
          component: ()=>import('@/pages/Article'),
          meta:{
            title:'文章'
          }
        },
        {
          path: "my",
          component: ()=>import('@/pages/My'),
          meta:{
            title:'我的'
          }
        },
      ],
    },
    {
      path:'*',
      component:()=>import('@/pages/v404')
    }
]

export default routes;